I2c multi-slot circuit system and method for transmitting i2c signals

ABSTRACT

An I2C multi-slot circuit system includes a plurality of I2C slots for receiving a plurality of slave processors, a CPU, a logic control unit, and a I2C switch unit. The CPU determines an address of one of the I2C slots which to-be-transmitted data will be transmitted to, and generates a first logic control signal according to the determined address. The logic control unit enables the one of the I2C slots which the to-be-transmitted data will be transmitted to according to the first logic control signal. The I2C switch unit receives and transmits I2C signal converted from the to-be-transmitted data by the CPU to the I2C slot. A related method is also provided.

BACKGROUND

1. Technical Field

The present disclosure relates to multi-slot circuit systems, and particularly, to an I2C (Inter Integrated Circuit) multi-slot circuit system and a method for transmitting I2C signals.

2. Description of the Related Art

A master processor such as a CPU of an electronic device commonly communicates with one or more slaves processors through I2C buses. Each slave is allocated an address. The master accesses the slaves employing the addressing mode, that is, the master communicates with the slaves based on the corresponding addresses of the slaves. However, employing the addressing mode, the master needs to transmit many addressing signals, which may decrease efficiency of the master.

Therefore, there is room for improvement within the art.

BRIEF DESCRIPTION OF THE DRAWINGS

The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of an I2C multi-slot circuit system and a method for transmitting I2C signals. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.

FIG. 1 is a block diagram of an I2C multi-slot circuit system in accordance with an exemplary embodiment.

FIG. 2 is a circuit diagram of the I2C multi-slot circuit system of FIG. 1 in accordance with an exemplary embodiment.

FIG. 3 is a flowchart of a method for transmitting I2C signals in accordance with an exemplary embodiment.

DETAILED DESCRIPTION

Referring to FIG. 1, an I2C multi-slot circuit system 100 includes a CPU 10, a control logic unit 20, an I2C switch unit 30, and a plurality of I2C slots 50 each for receiving a slave processor (not shown). The CPU 10 is configured for converting to-be-transmitted data into I2C signals. When the CPU 10 needs to transmit the to-be-transmitted data to a target slave, the CPU 10 generates a first logic control signal according to an address of the slot 50 of the target slave. The logic control unit 20 enables the I2C slot 50 of the target slave according to the first logic control signal, accordingly; only the target slave connected to the enabled I2C slot 50 is capable of receiving the I2C signals from the CPU 10. Therefore, in this embodiment the CPU 10 does not need to employ several addressing modes to communicate with the slaves.

The CPU 10 includes a storage unit 40 storing the addresses of the I2C slots 50. The CPU 10 determines the address of the I2C slot 50 which the to-be-transmitted data will be transmitted to, and generates the first logic control signal according to the determined address. The logic control unit 20 enables the I2C slot 50 which the to-be-transmitted data will be transmitted to according to the first logic control signal. The CPU 10 turns on the I2C switch unit 30 to transmit the I2C signals to the enabled I2C slot 50, so that the slave connected to the enabled I2C slot 50 can receive the I2C signals from the enabled I2C slot 50.

Referring to FIG. 2, the CPU 10 is connected to the logic control unit 20 via a logic data line 11 for transmitting the logic control signal to the logic control unit 20. The CPU 10 is connected to the I2C switch unit 30 via a first I2C bus.

The logic control unit 20 generates enabling signals according to the first logic control signal. The logic control unit 20 includes a plurality of ports 21 for transmitting the enabling signals, and each of the ports 21 is connected to one I2C slot 50 via a signal line 51. In an exemplary embodiment, the logic control unit 20 is a control logic IC including eight ports 21, and the enabling signals are 01111111, 10111111, . . . 11111110. In an alternative embodiment, the logic control unit 20 is a control logic IC including 12 ports or 21 ports.

The I2C switch unit 30 includes multi-way I2C output ports (not labeled) and second I2C buses 32. The I2C switch unit 30 is connected to the I2C slots 50 via the second I2C buses 32 for transmitting I2C signals to the I2C slots 50. Each of the second I2C buses 32 is connected to at least one I2C slot 50. In this embodiment, the I2C switch unit 30 is an I2C switch IC including three second I2C buses, and each of the second I2C buses is connected to at least four I2C slots 50. When the logic control unit 20 enables the target I2C slot 50, the CPU transmits the I2C signals converted from the to-be-transmitted data to the I2C switch unit 30, and the I2C signals are transmitted to the enabled I2C slot 50 via the second I2C buses.

The CPU 10 is further configured for generating a second logic control signal when determining that transmission of the I2C signals is finished. The logic control unit 20 is further configured to generate a disabling signal to disable the enabled I2C slot 50 according to the second logic control signal. In this embodiment, the second logic control signal is 11111111 or 00000000.

FIG. 3 is a flowchart of a method for transmitting the I2C signals in accordance with an exemplary embodiment.

In step S31, the CPU 10 determines the address of the I2C slot 50 which the to-be-transmitted data will be transmitted to, and generates the first logic control signal according to the determined address.

In step S32, the logic control unit 20 enables the I2C slot 50 which the to-be-transmitted data will be transmitted to according to the first logic control signal.

In step S33, the CPU 10 turns on the I2C switch unit 30.

In step S34, the CPU 10 converts the to-be transmitted data into the I2C signals.

In step S35, the I2C signals are transmitted to the slave connected to the enabled I2C slot.

In step S36, the CPU 10 generates the second logic control signal to disable the enabled I2C slot 50 when determining that transmission of the I2C signals is finished.

It is understood that the present disclosure may be embodied in other forms without departing from the spirit thereof. Thus, the present examples and embodiments are to be considered in all respects as illustrative and not restrictive, and the disclosure is not to be limited to the details given herein. 

1. An I2C (Inter Integrated Circuit) multi-slot circuit system comprising: a plurality of I2C slots for receiving a plurality of slaves; a CPU configured for determining an address of one of the I2C slots which to-be-transmitted data will be transmitted to, and generating a first logic control signal according to the determined address, and being further configured for converting the to-be-transmitted data into an I2C signal; a logic control unit connected to the CPU and each of the I2C slots, the logic control unit being configured for enabling the one of the I2C slots which the to-be-transmitted data will be transmitted to according to the first logic control signal; and an I2C switch unit configured for receiving and transmitting the I2C signal to the enabled I2C slot.
 2. The I2C multi-slots circuit system as recited in claim 1, wherein the CPU comprises a storage unit storing the addresses of the I2C slots.
 3. The I2C multi-slots circuit system as recited in claim 1, wherein the logic control unit comprises a plurality of ports for transmitting the enabling signals, and each of the ports is connected to one of I2C slots via a signal line.
 4. The I2C multi-slots circuit system as recited in claim 1, wherein the I2C switch unit comprises a plurality of second I2C buses, and the I2C switch unit is connected to the I2C slots via the second I2C buses for transmitting the I2C signals to the I2C slots.
 5. The I2C multi-slots circuit system as recited in claim 1, wherein the CPU is further configured for providing a second logic control signal to disable the enabled I2C slot when determining that the transmission of the I2C signals is finished.
 6. A method for transmitting I2C signals applied in an I2C multi-slot circuit system, the I2C multi-slot circuit system comprising a plurality of I2C slots for receiving a plurality of slaves and an I2C switch unit, the method comprising: determining an address of one of the I2C slots which to-be-transmitted data will be transmitted to, and generating a first logic control signal according to the determined address; enabling the one of the I2C slot which the to-be-transmitted data will be transmitted to according to the first logic control signal; converting the to-be-transmitted data into an I2C signal; and transmitting the I2C signal to one of the slaves connected to the enabled I2C slot via the enabled I2C slot.
 7. The method as recited in claim 6, further comprising: turning on the I2C switch unit after enabling the I2C slot according to the first logic control signal.
 8. The method as recited in claim 6, further comprising: generating a second signal logic control signal to disable the enabled I2C slot when determining that transmission of the I2C signals is finished. 